<?php $this->headScript()->appendFile($this->JS_PATH . "vat.js"); ?>
<div id="vat-listing"></div>


<div class="clearfix"></div>
<div class="content">
    <div class="page-title"> <i class="icon-custom-right"></i>
        <h3><span class="semi-bold">List Vat</span></h3>
    </div>
<?php echo $this->flashmessages(); ?>
    <div class="row">
        <div class="col-md-12">
            <div class="grid simple transparent" style="background-color:white;">
                
                <div class="grid-body">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="grid simple ">

                                <div class="grid-body no-border dataTables_wrapper form-inline">
                                    <h3>Vat <span class="semi-bold">Listing</span></h3>
                                     
                             <table class="table table-hover">
                    <thead>
                         <tr>
                                                <td colspan="3" align="right">
                                                <a class="btn btn-success btn-cons"
                                        href="<?php echo $this->url(array('module' => 'default', 'controller' => 'vat', 'action' => 'form'), null, TRUE); ?>"
                                        >+ Add Vat</a>
                                                </td>
                                            </tr>
                        <tr>
<th class="col-md-3">
                                <a href="<?php echo $this->url(array("controller" => "vat", "action" => "list", "field" => "vat_percent", "sort" => "asc"), "default", false); ?>">
                                    <img src="<?php echo $this->IMAGE_PATH; ?>datatables/sort_asc.png"  alt="Ascending" title="Ascending" class="sort_asc" />
                                </a>
                                Percentage
                                <a href="<?php echo $this->url(array("controller" => "vat", "action" => "list", "field" => "vat_percent", "sort" => "desc"), "default", false); ?>">
                                    <img src="<?php echo $this->IMAGE_PATH; ?>datatables/sort_desc.png"  alt="Descending" title="Descending" class="sort_desc"  />
                                </a>
                                
                              </th>
                              <th style="width:20%">Action</th>  </tr>
                    </thead>
                    <tbody>
                        <?php if (count($this->vatsData) > 0): ?>
                            <?php $counter = 0; ?>
                            <?php foreach ($this->vatsData as $key => $value) : ?>
                                <!-- row -->
                                <tr <?php if ($counter == 0): ?>class="first"<?php endif; ?>>
                                   <td> 
                                        <a href="<?php echo $this->url(array("module" => "default","controller" => "vat", "action" => "form", "vat_id" => $value["vat_id"]), null, true); ?>">
                                            <?php echo $value["vat_percent"]."%"; ?>
                                        </a>
                                    </td>
                                    
                                    <td>
                                                <a class="label label-success clickable" href="<?php echo $this->url(array('controller' => 'vat', 'action' => 'form', 'vat_id' => $value["vat_id"]), null, true); ?>">
                                                    Edit
                                                </a>&nbsp;
                                                <a class="label label-important clickable" href="<?php echo $this->url(array('controller' => 'vat', 'action' => 'delete', 'vat_id' => $value["vat_id"]), null, true); ?>">
                                                    Delete
                                                </a>
                                            </td>
						
                                </tr>
                                <?php $counter++; ?>
                            <?php endforeach; ?>
                        <?php else: ?>
                            <tr class="row2" >
                                <td>&nbsp;</td>
                                <td colspan="8"> No Record Found</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            
                                    
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="dataTables_paginate paging_bootstrap pagination">
                                            <?php echo $this->paginator->displayPages(); ?>
                                        </div>
                                    </div>
                                </div>
                                
                                    
                                </div>
                                
                                
                                
                                <div class="paging">
                    <div>
                    
                    </div>
                </div>
                                
                                
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<!-- END PAGE -->
